//
//  OMTNavigationController.m
//  OMTUIKit
//
//  Created by 昭荣伊 on 2018/7/30.
//

#import "OMTNavigationController.h"

@interface OMTNavigationController () <UIGestureRecognizerDelegate>

@end

@implementation OMTNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.interactivePopGestureRecognizer.delegate = self;
}


- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    // 隐藏tabBar
    if (self.childViewControllers.count >= 1) {
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
}

- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
    return self.childViewControllers.count > 1;
}

@end
